package builder

class AlertDialog private constructor(
    title: String,
    alert: String,
    cancel: String,
    confirm: String
) {
    init {
        PrintUtil.print("创建了一个提示框，title：${title},alert：${alert},cancel：${cancel},confirm：${confirm}")
    }

    class Builder {
        private var title = "title"
        private var alert = "msg"
        private var cancel = "cancel"
        private var confirm = "confirm"

        fun setTitle(title: String): Builder {
            this.title = title
            return this
        }

        fun setContent(alert: String): Builder {
            this.alert = alert
            return this
        }

        fun setCancel(cancel: String): Builder {
            this.cancel = cancel
            return this
        }

        fun setConfirm(confirm: String): Builder {
            this.confirm = confirm
            return this
        }

        fun build(): AlertDialog {
            return AlertDialog(title, alert, cancel, confirm)
        }
    }
}